package cn.dz.dao;

import cn.dz.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

/**
 * @ClassName UserDao
 * @package: cn.dz.dao
 * @Description 用户dao层
 * @Author dz
 * @Date 2024/12/22 17:50
 * @Version 1.0
 **/
@Mapper
public interface UserDao {
    //@Select("select * from `user` where username = #{username}")
    User findByUserName(String userName);


    //@Insert("INSERT INTO user (username, realname, password, gender) VALUES (#{username}, #{realname}, #{password}, #{gender})")
    //@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    void save(User user);
}
